@extends('admin.base.index')
@section('content')
<div class="block-area" id="tableStriped">
                    <h3 class="block-title">问题反馈列表主页</h3>
                    <form action="" method="post" name="myform">
				    	<input type="hidden" name="_token" value="{{ csrf_token() }}">
				    	<input type="hidden" name="_method" value="DELETE">
				    </form>
                    <div class="table-responsive overflow">
                        <table class="tile table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <td align="center">issueid</td>
                                    <td align="center">userid</td>
                                    <td align="center">content</td>
                                    <td align="center">return</td>
                                    <td align="center">phone</td>
                                    <td align="center"></td>
                                </tr>
                            </thead>
                            <tbody>
                             @foreach($list as $v)
                                <tr>
                                    <td align="center">{{ $v->issueid }}</td>
                                    <td align="center">{{ $v->userid }}</td>
                                    <td align="center">{{ $v->content }}</td>
                                    <td align="center">{{ $v->return }}</td>
                                    <td align="center">{{ $v->phone }}</td>
                                    <td align="center">
                                        <a href="javascript:doDel({{ $v->issueid }})">
                                            <button class="btn-warning">删除问题</button>
                                        </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    					<a href="javascript:dodoDel({{ $v->issueid }})">
                    						<button class="btn-primary">删除回复</button>
                    					</a><br/>
                                        <a href="{{ url('admin/issuemake') }}?issueid={{ $v->issueid }}">
                                            <button class="btn-success">问题回复</button>
                                        </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                        <a href="{{ url('admin/issuemake') }}/{{ $v->issueid }}/edit">
                                            <button class="btn-danger">修改回复</button>
                                        </a>
                   			 		</td>
                                </tr>
                             @endforeach
                            </tbody>
                        </table>
                        <script type="text/javascript">
				        	function doDel(id)
				        	{
				        		if(confirm('确定要删除问题吗???')){
				        			var form = document.myform;
				        			form.action = '/admin/issue/'+id;
				        			form.submit();
				        		}
				        	}
                            function dodoDel(id)
                            {
                                if(confirm('确定要删除回复吗???')){
                                    var form = document.myform;
                                    form.action = '/admin/issuemake/'+id;
                                    form.submit();
                                }
                            }
       					</script>
                    </div>
                </div>
@stop
